<ol class="mini-products-list" id="block-related">
<?php

    foreach ($products as $key => $value):
        echo CHtml::openTag('li', array('class' => 'item', 'style' => ''));
            echo CHtml::openTag('div', array('class' => 'product'));
                echo CHtml::link(CHtml::image(Yii::app()->baseUrl."/uploads/images/products/".$value->image, $value->name, array('width' => '80%', 'class' => 'shadow')), Yii::app()->createUrl('product/view', array('id' => $value->id)), array());
                echo CHtml::openTag('div', array('class' => 'product-details', 'style' => 'margin-left: 5%'));
                    echo CHtml::tag('p', array(), CHtml::link($value->name, Yii::app()->createUrl('product/view', array('id' => $value->id)), array()));
                    echo CHtml::openTag('div', array('price-box'));
                        echo CHtml::openTag('span', array('class' => 'regular-price'));
                            echo CHtml::tag('span', array('class' => 'price', 'style' => 'margin: -25px'), number_format($value->price, 0, ' ', ' ') . "  VNĐ");
                        echo CHtml::closeTag('span');
                    echo CHtml::closeTag('div');
                echo CHtml::closeTag('div');
            echo CHtml::closeTag('div');
        echo CHtml::closeTag('li');
    endforeach;
?>
</ol>
